package unamur.iodass.communication.messages;

public class BookStore extends Message{
	
	private final String name;
	private final String adresse;
	private final String ip;
	private final int port;
	
	public BookStore(String name, String adresse, String ip, int port) {
		this.name = name;
		this.adresse = adresse;
		this.ip = ip;
		this.port = port;
	}
	
	public String getName() {
		return name;
	}
	
	public String getAdresse() {
		return adresse;
	}

	public String getIp() {
		return ip;
	}

	public int getPort() {
		return port;
	}
	
	@Override
	public boolean equals(Object obj) {
		BookStore bs = (BookStore) obj;
		
		if (bs.getName().equals(name) &&
				bs.getAdresse().equals(adresse) &&
					bs.getIp().equals(ip) &&
					bs.getPort() == port) {
			return true;
		}
			
		else 
			return false;
	}
	
}
